<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="/wondershare/js/jquery.js"></script> 
<script src="/wondershare/js/faq_comment.js"></script> 
<script src="/wondershare/js/jquery-ui.min.js"></script>
<script src="/wondershare/js/public_ws.js"></script>
<link href="/wondershare/styles/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href="/wondershare/styles/main.css" rel="stylesheet" type="text/css" />
<link href="/wondershare/styles/general.css" rel="stylesheet" type="text/css" />
<title>评论管理</title>
<script>
 $(document).ready(function() 
 {
		$("#start_date").datepicker(  
	   {  
		 dateFormat:'yy-mm-dd',  // 设置日期格式  
	   }); 
	   $("#end_date").datepicker(  
	   {  
		 dateFormat:'yy-mm-dd',  // 设置日期格式  
	   }); 
 });
 function check_submit()
{
   var falge = false;
   if($('#start_date').val().replace(/(^\s*)|(\s*$)/g, "")!= "")
   {
   	   if(CheckDate($('#start_date').val()) )
	  {
		 alert('您输入的开始日期格式不正确！');
		  $('#start_date').focus();
		  return false;
	  }
  }
  if($('#end_date').val().replace(/(^\s*)|(\s*$)/g, "")!= "")
  {
	  if(CheckDate($('#end_date').val()))
	  {
		 alert('您输入的结束日期格式不正确！');
		  $('#end_date').focus();
		  return false;
	  }
  }
  var i_stime=Date.parse($("#start_date").val().replace("-", "/"));
  var e_stime=Date.parse($("#end_date").val().replace("-", "/"));
  if(i_stime>e_stime)
  {
	    alert("开始时间不能大于结束时间！")
		$('#start_date').focus();
		return false;
  }
  return true;
}
</script>
</head>
<body >
<h1>
<!--<span class="action-span">
<a href="/wondershare/faq_comment.php?action=add_edit&act=add">添加新评论</a>
</span>-->
<span class="action-span">
<a href="/wondershare/faq_comment.php?action=export&web_type=<{$web_type}>">导出评论成xls</a>
</span>
<div style="clear:both"></div>
</h1>
<form id="myform" name="myform" method="POST" action="/wondershare/faq_comment.php?action=index&web_type=<{$web_type}>" onsubmit="return check_submit();">

    <img height="22" border="0" width="26" alt="SEARCH" src="images/icon_search.gif">
        <!-- 分类 -->
    评论类型：<select name="co_type" style="width:100px;">
	<option value="0">所有类型</option>
	<option value="1" <{if $co_type == '1'}> selected="selected" <{/if}> >文章评论</option>
	<option value="2" <{if $co_type == '2'}> selected="selected" <{/if}>  >视频评论</option>
	<option value="3" <{if $co_type == '3'}> selected="selected" <{/if}>  >在线帮助评论</option>
	</select>
  <!-- 推荐 -->
    是否有评论内容：<select name="co_content"><option value="all" <{if $co_content == 'all'}> selected="selected" <{/if}> >全部</option>
	<option value="1" <{if $co_content == '1'}> selected="selected" <{/if}> >有</option>
	<option value="0" <{if $co_content == '0'}> selected="selected" <{/if}> >无</option></select>   
    
    评论ID：<input type="text" size="5" name="co_id" value="<{$co_id}>">
	&nbsp;&nbsp;开始时间: <input type="text" size="20"   name="start_date" id="start_date" value="<{$start_date}>" > 
	&nbsp;&nbsp;结束时间: <input type="text" size="20"  name="end_date" id="end_date" value="<{$end_date}>"> 
    标题：<input type="text"  style="width:150px;" name="co_title" value="<{$co_title|escape}>">
  
    <input type="submit" class="button" name="search" value=" 搜索 ">

</form>
<table width="100%" cellspacing="1" cellpadding="2" id="list-table" class="list-div">
<tbody>
  <tr>
    <th align="center">评论ID</th>
    <th align="center">文章ID</th>
	<th align="center">标题（文章标题）</th>
	<th align="center">文章内容</th>
	<th align="center">评论人名称</th>
	<th align="center">评论人邮箱</th>
	<th align="center">评论类型</th>
	<th align="center">评论级别/有用否</th>
	<th align="center">评论时间</th>
  <!--  <th align="center">操作人员</th>-->
    <th align="center">操作时间</th>
	<!--<th align="center">审核状态</th>-->
	<th align="center">编辑</th>

  </tr>
<{foreach from=$comment_info item=comment}>
  <tr align="center"  id="tr_<{$comment.com_id}>">

	<td width="5%" align="center"  >
	<input value="<{$comment.com_id}>" name="ID[]" type="checkbox" > &nbsp; <{$comment.com_id}>
	</td>
	<td width="5%" align="center">
	<{$comment.new_id}>
	</td>
	<td width="10%" align="center">
	<{$comment.title}>
	</td>
	<td width="15%" align="center">
	<{$comment.com_content}>
	</td>
	<td width="8%" align="center">
	<{$comment.com_name}>
	</td>
	<td width="10%" align="center">
	<{$comment.com_email}>
	</td>
	<td width="7%" align="center" > 
	 <{if $comment.com_type == 1 }> 文章评论 <{elseif $comment.com_type == 2  }>视频评论 <{else}> 在线帮助<{/if}>
	</td>
	
	<td width="10%" align="center">
	<{if $comment.com_type == 2 }> 
	    <{if $comment.com_rating == 1 }>
	       <img src="/wondershare/images/dot.gif"  />
		<{elseif $comment.com_rating == 2}>
		   <img src="/wondershare/images/dot.gif"  />&nbsp;<img src="/wondershare/images/dot.gif"  />
		<{elseif $comment.com_rating == 3}>
		    <img src="/wondershare/images/dot.gif"  />&nbsp;<img src="/wondershare/images/dot.gif"  />&nbsp;<img src="/wondershare/images/dot.gif"  />
		<{elseif $comment.com_rating == 4}>
		     <img src="/wondershare/images/dot.gif"  />&nbsp;<img src="/wondershare/images/dot.gif"  />&nbsp;<img src="/wondershare/images/dot.gif"  />&nbsp;
			<img src="/wondershare/images/dot.gif"  />
		<{elseif $comment.com_rating == 5}>
		      <img src="/wondershare/images/dot.gif"  />&nbsp;<img src="/wondershare/images/dot.gif"  />&nbsp;<img src="/wondershare/images/dot.gif"  />&nbsp;
			<img src="/wondershare/images/dot.gif"  />&nbsp;<img src="/wondershare/images/dot.gif"  />
		<{else}>
		<{/if}>
	<{else}>
	   <{if $comment.com_useful == 0 }>
	     无用（用于非视频）
	   <{else}>
	     有用（用于非视频）
	   <{/if}>
	<{/if}>
	</td>
	
	<td width="10%" align="center">
	<{$comment.com_time}>
	</td>
 	<!--<td width="10%" align="center">
	<{$comment.update_user}>
	</td>-->  
	<td width="10%" align="center">
	<{$comment.update_time}>
	</td> 
	<!--<td width="10%" align="center">
	<{if $comment.com_status == 0 }>
	     未审核
	   <{else}>
	     已审核
	   <{/if}>
	</td>-->
	<td width="10%" align="center">

	<a href="/wondershare/faq_comment.php?action=add_edit&act=edit&comment_id=<{$comment.com_id}>&web_type=<{$web_type}>" > 编辑 </a>&nbsp;&nbsp;
 <a href="#" onclick="{if(confirm('确定要删除记录吗?')){delete_faq_comment(<{$comment.com_id}>,'in_delete','faq_comment');}return false;}" >删除</a> 

    </td>
  </tr>
 <{/foreach}>

  <tr >
	   
	    <td colspan="11"  ><div style="margin-left:10px;"><input name="checkall" value="checked" onclick="v=document.getElementsByName('ID[]');if(this.checked){for(i=0;i<v.length;i++)v[i].checked=true;}else{for(i=0;i<v.length;i++)v[i].checked=false;}" type="checkbox">全选&nbsp;&nbsp;&nbsp;&nbsp;
		<input name="sub" value="删除" type="button" onclick="delete_faq_comment(0,'list','faq_comment');">&nbsp;&nbsp;&nbsp;&nbsp;
		 <{$page_url}> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 共有 <span id="total"><{$total}> </span>条记录</div></td>
	</tr>
  </tbody>
</table>
</body>
</html>